python string startswith 在 Checking whether a string starts with XXXX - Stack Overflow 的評價 However, more generally, what you are doing with if [[ "$string" =~ ^hello ]]. is a regex match. To do the same in Python, you would do: ... <看更多>